<html>
  <head>
  	<meta charset="utf-8"/>
  	<script type="text/javascript">
  	window.onload = function(){
  		var oInput = document.getElementById("txt");
  		oInput.focus();
  	}
  	function toDoSt(){
  		var plugin = document.getElementById("plugin");
  		alert(plugin.version);
  	}

  	function send(){
  		document.getElementById("txt").focus();
  		var plugin = document.getElementById("plugin");
  		plugin.sendkey();
  	}

  	function showInfo(arg){
  		console.log(arg);
  	}
  	</script>
  	<embed id="plugin" type="application/npscript">
  	</head>
  	<body>
  		<input type="text" id="txt"/>
  		<input type="button" onclick="toDoSt()" value="test">
  		<input type="button" onclick="send()" value="send" id="btnSend">
  	</body>
</html>